Object.myEntries=function(obj){
    let arr=[]
    for(let key in obj){
        obj.hasOwnProperty(key)&&arr.push([key,obj[key]])
    }
    return arr
}
const object1 = {
    a: 'somestring',
    b: 42,
    c:undefined
  };
  console.log(Object.myEntries('foo'));